﻿using System;

namespace NDBGen.Descriptors.Columns.Tokens
{
    [ColumnTokenDescriptor(HasValue = true)]
    public sealed class SubstitutedDataTypeTokenDescriptor : ColumnTokenDescriptorBase
    {
        public SubstitutedDataTypeTokenDescriptor() { }
        internal SubstitutedDataTypeTokenDescriptor(Table table, String columnName, String substitutedTypeName)
        {
            var column = new Column(table, columnName, DataType.None);
            this.Init(table, column, substitutedTypeName);
        }

        protected override Char Token { get { return '$'; } }
        
        public override String ToString()
        {
            return this.Token.ToString() + this.TokenValue;
        }
    }
}